package com.wx.tgp.designpattern.FactoryModePattern.FactoryMethod;


/**
 * 减法运算类
 */
public class OperationSub implements com.wx.tgp.designpattern.FactoryModePattern.FactoryMethod.Operation{

    private double number1;
    private double number2;

    public OperationSub(double number1,double number2){
        this.number1 = number1;
        this.number2 = number2;
    }

    @Override
    public double getResult() {
        return number1 - number2;
    }

    public double getNumber1() {
        return number1;
    }

    public void setNumber1(double number1) {
        this.number1 = number1;
    }

    public double getNumber2() {
        return number2;
    }

    public void setNumber2(double number2) {
        this.number2 = number2;
    }
}
